package com.hean.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBOpenHelper extends SQLiteOpenHelper {
	private static final String DBNAME=	"hean";
	private static final int VERSION=1;
	
	public DBOpenHelper(Context context){
		super(context, DBNAME, null, VERSION);
	}
	
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("create table if not exists filedown (id integer primary key autoincrement,downpath varchar(100),threadid integer,position integer)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("drop table if exists filedown");
		onCreate(db);
	}

}
